package nickthissen.iracing.activities;

import java.util.ArrayList;

import nickthissen.iracing.iracingforum2.R;

import android.content.Intent;
import android.os.Bundle;

import com.actionbarsherlock.app.SherlockListActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;

public abstract class ItemListActivity<E> extends SherlockListActivity
{
	protected abstract void loadData();
	protected abstract void setItems(ArrayList<E> items);
    public abstract void onItemClicked(E item);

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        SherlockUtils.setNotificationBar(this);
    }

    @SuppressWarnings("unchecked")
	protected E getItemAtPosition(int position)
    {
    	return (E)getListView().getItemAtPosition(position);
    }


}
